//
//  File.swift
//  
//
//  Created by Ink on 2022/2/9.
//

import Foundation
@testable import ZMSwiftUtils

class SwizzleTest {
    
    var swizzle = false
    
    static let swizzle = Swizzle(SwizzleTest.self) {
        #selector(test(_:)) <-> #selector(swzzleTest(_:))
    }

    func execute() {
        _ = SwizzleTest.swizzle

        test(true)
    }
    
    @objc dynamic func test(_ t:Bool) {
        print(#function)
    }
    
}

extension SwizzleTest {
    @objc func swzzleTest(_ t:Bool) {
        print(#function)
        swzzleTest(t)
        swizzle = true
    }
}
